home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’96 / Booting Gallery / Booting Gallery (source) / Sources / Blasteroids / BlasteroidsShipSprite.h < prev   
Encoding:
C/C++ Source or Header  |  1996-06-22  |  1.1 KB  |  60 lines  |  [TEXT/CWIE]

  1. #ifndef __GunSprite_H__
  2. #define __GunSprite_H__
  3.  
  4. /***
  5.  *     Created by Bill Hubauer on Fri, Jun 21, 1996 @ 2:53 AM.
  6.  *
  7.  ***/
  8.  
  9. #ifndef __SpriteGame_H__
  10. #include "SpriteGame.h"
  11. #endif
  12.  
  13.  
  14. class CBlasteroidsShipSprite : public CGameSprite
  15. {
  16. public:
  17.     CBlasteroidsShipSprite(CSpriteWorld* world,CSpriteGame* game);
  18.     virtual ~CBlasteroidsShipSprite();
  19.     
  20.     
  21.     enum { kBaseImageID = 1000 , kMoveHInterval = 20, kMoveVInterval = 20};
  22.     
  23.     virtual    void    UpdatePosition() ; //Override
  24.     
  25. protected:
  26.             
  27.             Boolean    LeftArrowQ();
  28.             Boolean    RightArrowQ();
  29.             Boolean    UpArrowQ();
  30.             Boolean    DownArrowQ();
  31.             Boolean    SpaceDownQ();
  32.             
  33.             void    FireGun();
  34.             
  35.             short    fHMomentum;
  36.             short    fVMomentum;
  37.             short    fSpeed;
  38.             short    fShipId;
  39.             short    fShipVariant;
  40. };
  41.  
  42. class CBlasteroidsBulletSprite : public CGameSprite
  43. {
  44. public:
  45.     CBlasteroidsBulletSprite(CSpriteWorld* world,CSpriteGame* game,short startTop,short startLeft,
  46.         short deltaV,short deltaH);
  47.     virtual ~CBlasteroidsBulletSprite();
  48.     
  49.     virtual    void    UpdatePosition();
  50.     
  51. protected:
  52.     enum { kBulletImageID = 2000 };
  53.  
  54.     short    fDeltaH;
  55.     short    fDeltaV;
  56. };
  57.  
  58.  
  59. #endif
  60.